using Project.Configs.Abstractions;
using UnityEngine;

namespace Project.Configs
{
    [CreateAssetMenu(menuName = ConfigsMenuName + nameof(InventoryConfig))]
    public class InventoryConfig : ScriptableConfigBase
    {
        [field: SerializeField, Min(0)] public int MinQuantityOfSlots { get; private set; } = 6;
        [field: SerializeField, Min(0)] public int MaxQuantityOfSlots { get; private set; } = 12;

#if UNITY_EDITOR
        private void OnValidate()
        {
            MinQuantityOfSlots = Mathf.Clamp(MinQuantityOfSlots, 0, MaxQuantityOfSlots);
        }
#endif
    }
}
